#ifndef FAT_MAZE_PATH_FINDING_H
#define FAT_MAZE_PATH_FINDING_H

#include "states/MazeState.h"

namespace fmpfr
{
    const int NEIGHBOURS_SIZE=8;
    const int RULES_SIZE=72;
    const int rules[RULES_SIZE][NEIGHBOURS_SIZE+2]={


        {EMPTY,1,3,1,3,1,3,3,3,FILLED},//NES
        {EMPTY,1,3,1,3,2,3,3,3,FILLED},
        {EMPTY,1,3,2,3,1,3,3,3,FILLED},
        {EMPTY,2,3,1,3,1,3,3,3,FILLED},
        {EMPTY,1,3,2,3,2,3,3,3,FILLED},
        {EMPTY,2,3,1,3,2,3,3,3,FILLED},
        {EMPTY,2,3,2,3,1,3,3,3,FILLED},
        {EMPTY,2,3,2,3,2,3,3,3,FILLED},

        {EMPTY,3,3,1,3,1,3,1,3,FILLED},//SEW
        {EMPTY,3,3,1,3,1,3,2,3,FILLED},
        {EMPTY,3,3,1,3,2,3,1,3,FILLED},
        {EMPTY,3,3,1,3,2,3,2,3,FILLED},
        {EMPTY,3,3,2,3,1,3,1,3,FILLED},
        {EMPTY,3,3,2,3,1,3,2,3,FILLED},
        {EMPTY,3,3,2,3,2,3,1,3,FILLED},
        {EMPTY,3,3,2,3,2,3,2,3,FILLED},

        {EMPTY,1,3,3,3,1,3,1,3,FILLED},//NWS
        {EMPTY,1,3,3,3,1,3,2,3,FILLED},
        {EMPTY,1,3,3,3,2,3,1,3,FILLED},
        {EMPTY,1,3,3,3,2,3,2,3,FILLED},
        {EMPTY,2,3,3,3,1,3,1,3,FILLED},
        {EMPTY,2,3,3,3,1,3,2,3,FILLED},
        {EMPTY,2,3,3,3,2,3,1,3,FILLED},
        {EMPTY,2,3,3,3,2,3,2,3,FILLED},

        {EMPTY,1,3,1,3,3,3,1,3,FILLED},//NEW
        {EMPTY,1,3,1,3,3,3,2,3,FILLED},
        {EMPTY,1,3,2,3,3,3,1,3,FILLED},
        {EMPTY,1,3,2,3,3,3,2,3,FILLED},
        {EMPTY,2,3,1,3,3,3,1,3,FILLED},
        {EMPTY,2,3,1,3,3,3,2,3,FILLED},
        {EMPTY,2,3,2,3,3,3,1,3,FILLED},
        {EMPTY,2,3,2,3,3,3,2,3,FILLED},



        /* II. nie trzeba, bo jest WS-S-E
            {EMPTY,1,1,0,0,0,3,1,3,FILLED},//W-N-NE
            {EMPTY,1,1,0,0,0,3,2,3,FILLED},
            {EMPTY,1,2,0,0,0,3,1,3,FILLED},
            {EMPTY,1,2,0,0,0,3,2,3,FILLED},
            {EMPTY,2,1,0,0,0,3,1,3,FILLED},
            {EMPTY,2,1,0,0,0,3,2,3,FILLED},
            {EMPTY,2,2,0,0,0,3,1,3,FILLED},
            {EMPTY,2,2,0,0,0,3,2,3,FILLED},
                */
        /* Bez tego bo jest e-n-nw

            {EMPTY,0,0,0,1,1,3,1,3,FILLED},//W-S-SE
            {EMPTY,0,0,0,1,1,3,2,3,FILLED},
            {EMPTY,0,0,0,1,2,3,1,3,FILLED},
            {EMPTY,0,0,0,1,2,3,2,3,FILLED},
            {EMPTY,0,0,0,2,1,3,1,3,FILLED},
            {EMPTY,0,0,0,2,1,3,2,3,FILLED},
            {EMPTY,0,0,0,2,2,3,1,3,FILLED},
            {EMPTY,0,0,0,2,2,3,2,3,FILLED},
        */
        {EMPTY,1,3,1,1,0,0,0,0,FILLED},//N-E-SE
        {EMPTY,1,3,1,2,0,0,0,0,FILLED},
        {EMPTY,1,3,2,1,0,0,0,0,FILLED},
        {EMPTY,1,3,2,2,0,0,0,0,FILLED},
        {EMPTY,2,3,1,1,0,0,0,0,FILLED},
        {EMPTY,2,3,1,2,0,0,0,0,FILLED},
        {EMPTY,2,3,2,1,0,0,0,0,FILLED},
        {EMPTY,2,3,2,2,0,0,0,0,FILLED},

        {EMPTY,1,3,0,0,0,1,1,3,FILLED},//N-W-SW
        {EMPTY,1,3,0,0,0,1,2,3,FILLED},
        {EMPTY,1,3,0,0,0,2,1,3,FILLED},
        {EMPTY,1,3,0,0,0,2,2,3,FILLED},
        {EMPTY,2,3,0,0,0,1,1,3,FILLED},
        {EMPTY,2,3,0,0,0,1,2,3,FILLED},
        {EMPTY,2,3,0,0,0,2,1,3,FILLED},
        {EMPTY,2,3,0,0,0,2,2,3,FILLED},

        //OK
        {EMPTY,1,3,1,3,0,0,0,1,FILLED},//E-N-NW
        {EMPTY,1,3,1,3,0,0,0,2,FILLED},
        {EMPTY,1,3,2,3,0,0,0,1,FILLED},
        {EMPTY,1,3,2,3,0,0,0,2,FILLED},
        {EMPTY,2,3,1,3,0,0,0,1,FILLED},
        {EMPTY,2,3,1,3,0,0,0,2,FILLED},
        {EMPTY,2,3,2,3,0,0,0,1,FILLED},
        {EMPTY,2,3,2,3,0,0,0,2,FILLED},

        //OK
        {EMPTY,0,3,1,3,1,1,0,0,FILLED},//E-S-SW
        {EMPTY,0,3,1,3,1,2,0,0,FILLED},
        {EMPTY,0,3,1,3,2,1,0,0,FILLED},
        {EMPTY,0,3,1,3,2,2,0,0,FILLED},
        {EMPTY,0,3,2,3,1,1,0,0,FILLED},
        {EMPTY,0,3,2,3,1,2,0,0,FILLED},
        {EMPTY,0,3,2,3,2,1,0,0,FILLED},
        {EMPTY,0,3,2,3,2,2,0,0,FILLED},
        /*
              nie, bo jest N-W-SW

            {EMPTY,0,1,1,3,1,3,0,0,FILLED},//S-E-NE
            {EMPTY,0,1,1,3,2,3,0,0,FILLED},
            {EMPTY,0,1,2,3,1,3,0,0,FILLED},
            {EMPTY,0,1,2,3,2,3,0,0,FILLED},
            {EMPTY,0,2,1,3,1,3,0,0,FILLED},
            {EMPTY,0,2,1,3,2,3,0,0,FILLED},
            {EMPTY,0,2,2,3,1,3,0,0,FILLED},
            {EMPTY,0,2,2,3,2,3,0,0,FILLED},
        */
        {EMPTY,0,0,0,3,1,3,1,1,FILLED},//S-W-NW
        {EMPTY,0,0,0,3,1,3,1,2,FILLED},
        {EMPTY,0,0,0,3,1,3,2,1,FILLED},
        {EMPTY,0,0,0,3,1,3,2,2,FILLED},
        {EMPTY,0,0,0,3,2,3,1,1,FILLED},
        {EMPTY,0,0,0,3,2,3,1,2,FILLED},
        {EMPTY,0,0,0,3,2,3,2,1,FILLED},
        {EMPTY,0,0,0,3,2,3,2,2,FILLED},


    };
}
#endif // FAT_MAZE_PATH_FINDING_H
